import React from 'react';
import { renderRoutes } from 'react-router-config';
import { HashRouter } from 'react-router-dom';

import { BackTop } from 'antd';

import routes from './router';
import store from './store'

import JPAppHeader from '@c/app_header';
import JPAppFooter from '@c/app_footer';
import { Provider } from 'react-redux';

export default function App() {
  return (
    <Provider store={store}>
      <HashRouter>
        <JPAppHeader />

        {/* 路由相关配置 */}
        {renderRoutes(routes)}

        <JPAppFooter />

        <BackTop />
      </HashRouter>
    </Provider>
  );
}
